package template4
{
	import flash.display.MovieClip;
	import flash.text.TextField;
	import flash.events.Event;
	import flash.text.TextFieldType;
	import flash.display.Bitmap;
	import flash.text.TextFormat;
	import flash.events.MouseEvent;
	import flash.display.Sprite;
	
	/**
	 * ...
	 * @author sm
	 */
	public class VideoScreenSpanish extends MovieClip
	{
		private var bgImage:Image	
		private var textContent:TextField;
		private var image1:Image;
		private var image2:Image;
		private var image3:Image;
		private var cancel:Image;
		public var videoWidth:int = 402;
		public var videoHeight:int = 200;
		public var videoX:int = 193;
		public var videoY:int = 88;
		
		public function VideoScreenSpanish() 
		{
			bgImage = new Image();
			bgImage.bitmap = Icons.BACKGROUND_VIDEO_SPANISH;
			this.addChild(bgImage);
			bgImage.x = (800 - bgImage.width) / 2;
			bgImage.y = (600 - bgImage.height) / 2;
			
			textContent=new TextField();
			textContent.x=220;
			textContent.y=310;
			textContent.width=340;
			textContent.height=60;
			textContent.selectable=false;
			textContent.type=TextFieldType.DYNAMIC;
			textContent.multiline = true
			textContent.wordWrap = true;
			textContent.defaultTextFormat = new TextFormat("Ubuntu" ,14,null,null,null,null,null,null,"center");
			textContent.embedFonts=true;
			this.addChild(textContent);
		
			image1=new Image();
			image1.x=225;
			image1.y=381;
			image1.dimension(100,100);
			this.addChild(image1);
			
			image2=new Image();
			image2.x=350;
			image2.y=381;
			image2.dimension(100,100);
			this.addChild(image2);
			
			image3=new Image();
			image3.x=475;
			image3.y=381;
			image3.dimension(100,100);
			this.addChild(image3);
			
			
			cancel=new Image();
			cancel.x=350;
			cancel.y = 514;
			cancel.buttonMode = true;
			cancel.useHandCursor = true;
			cancel.addEventListener(MouseEvent.CLICK,handleCANCEL);
			this.addChild(cancel);
			cancel.bitmap=Icons.CANCEL_SPANISH;
		}
		public static const CANCEL:String="cancel";
		private function handleCANCEL(event:MouseEvent):void
		{
			dispatchEvent(new Event(CANCEL));
		}
		
		public function set contentText(str:String):void
		{
			textContent.text=str;
			if (textContent.textHeight < textContent.height)
			{
				textContent.height = textContent.textHeight+5 ;
				textContent.y = 310 + (60 - textContent.height) / 2;
			}

		}
		
		public function set image1Url(url:String):void
		{
			image1.url=url;
		}
		
		public function set image2Url(url:String):void
		{
			image2.url=url;
		}
		
		public function set image3Url(url:String):void
		{
			image3.url=url;
		}
	}

}